Compare commits
2 commits
7bc229de28
...
da242ed93a
Author | SHA1 | Date | |
---|---|---|---|
flash | da242ed93a | ||
flash | 82a5a9e292 |
|
@ -335,8 +335,7 @@ const MamiSockChatHandlers = function(ctx, client, setLoadingOverlay, sockChatRe
|
|||
}
|
||||
|
||||
if(authorMethod === 'name') {
|
||||
// the concat below should be done by the server, remove when fixed
|
||||
const botUserInfo = Umi.Users.FindExact(author) ?? Umi.Users.FindExact(`~${author}`);
|
||||
const botUserInfo = Umi.Users.FindExact(author);
|
||||
author = new MamiMessageAuthorInfo(
|
||||
Umi.User.isCurrentUser(botUserInfo),
|
||||
botUserInfo,
|
||||
|
@ -356,11 +355,11 @@ const MamiSockChatHandlers = function(ctx, client, setLoadingOverlay, sockChatRe
|
|||
author = new MamiMessageAuthorInfo(
|
||||
senderInfo.self,
|
||||
rawUserInfo,
|
||||
senderInfo.id ?? rawUserInfo.id,
|
||||
senderInfo.name ?? rawUserInfo.name,
|
||||
senderInfo.colour ?? rawUserInfo.colour,
|
||||
senderInfo.perms?.rank ?? rawUserInfo.perms?.rank ?? 0,
|
||||
senderInfo.avatar ?? rawUserInfo.avatar ?? new MamiUserAvatarInfo(senderInfo.id ?? rawUserInfo.id ?? '0'),
|
||||
senderInfo.id ?? rawUserInfo?.id,
|
||||
senderInfo.name ?? rawUserInfo?.name,
|
||||
senderInfo.colour ?? rawUserInfo?.colour,
|
||||
senderInfo.perms?.rank ?? rawUserInfo?.perms?.rank ?? 0,
|
||||
senderInfo.avatar ?? rawUserInfo?.avatar ?? new MamiUserAvatarInfo(senderInfo.id ?? rawUserInfo?.id ?? '0'),
|
||||
);
|
||||
|
||||
type = `message:${ev.detail.msg.flags.isAction ? 'action' : 'text'}`;
|
||||
|
@ -373,7 +372,7 @@ const MamiSockChatHandlers = function(ctx, client, setLoadingOverlay, sockChatRe
|
|||
detail,
|
||||
ev.detail.msg.id,
|
||||
author,
|
||||
ev.detail.msg.channel,
|
||||
channelName,
|
||||
ev.detail.msg.silent,
|
||||
));
|
||||
};
|
||||
|
|
|
@ -243,7 +243,6 @@ const SockChatS2CMessagePopulate = (ctx, timeStamp, userId, userName, userColour
|
|||
args: botParts.slice(2),
|
||||
};
|
||||
|
||||
// i think this is more Inaccurate Behaviour on the server side
|
||||
if(info.msg.botInfo.type === 'say')
|
||||
info.msg.botInfo.args[0] = SockChatUnfuckText(info.msg.botInfo.args[0]);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
const SockChatUnfuckText = (text, isAction) => {
|
||||
// P7.1 doesn't wrap in <i>, likely a bug in SharpChat
|
||||
// check if this is the case with the PHPChat impl
|
||||
if(isAction && text.startsWith('<i>'))
|
||||
text = text.slice(3, -4);
|
||||
|
||||
|
|
Loading…
Reference in a new issue